<?php echo <<<EOF
<script id="post_partial" type="text/template">
{{#data}}
{{^is_story}}
<div class="timeline">
    <div class="timeline__user">
        <div class="j-user" data-uid="{{user_id}}">
            <img src="{{ user_url }}">
            <p>{{ user_name }}</p>
        </div>
        {{#is_followed }}
        <button class="btn--follow btn--followed j-follow">已关注</button>
        {{/is_followed }}
        {{^is_followed }}
        <button class="btn--follow j-follow" data-uid="{{user_id}}">关注</button>
        {{/is_followed }}
    </div>
    <a href="javascript:;" class="jump-to-post" data-pid="{{pid}}">
        <div class="pic-grid g{{image_count}}">
            {{#images}}
            <div style="background-image: url({{ url }});"></div>
            {{/images}}
        </div>
    </a>
    <div class="timeline__btns">
        {{#is_zaned }}
        <a class="timeline__btn btn--zaned j-zan"></a>
        {{/is_zaned }}
        {{^is_zaned }}
        <a class="timeline__btn j-zan" data-pid="{{pid}}" data-uid="{{user_id}}"></a>
        {{/is_zaned }}

        <a class="timeline__btn j-comment jump-to-post" data-pid="{{pid}}"></a>
    </div>
    <div class="timeline__info">
        <p class="timeline__info--record">
            <span>{{ user_name }}</span>
            {{ post_desc }}
        </p>
        <p class="timeline__info--topic">
            {{#tags}}
            <span>#{{name}}</span>
            {{/tags}}
        </p>
        <p class="timeline__info--location">
            <span>{{ time }}</span>
            <span>{{ location }}</span>
        </p>
    </div>
</div>
{{/is_story}}
{{#is_story}}
<div class="timeline">
    <div class="timeline__user">
        <div class="j-user" data-uid="{{user_id}}">
            <img src="{{ user_url }}">
            <p>{{ user_name }}</p>
        </div>
        {{#is_followed }}
        <button class="btn--follow btn--followed j-follow">已关注</button>
        {{/is_followed }}
        {{^is_followed }}
        <button class="btn--follow j-follow" data-uid="{{user_id}}">关注</button>
        {{/is_followed }}
    </div>
    <a href="javascript:;" class="j-to-story" data-story-id="{{pid}}" data-uid="{{user_id}}">
        <div class="timeline__pictures grid-story" style="background-image: url({{story_main}})">
            <h1 class="grid-story__title">{{story_title}}</h1>
            <div class="grid-story__pics">
                {{#images}}
                <img src="{{ url }}">
                {{/images}}
                {{#story_total_image_count}}
                <span>{{story_total_image_count}}</span>
                {{/story_total_image_count}}

            </div>
        </div>
    </a>
    <div class="timeline__btns">
        {{#is_zaned }}
        <a class="timeline__btn btn--zaned j-zan"></a>
        {{/is_zaned }}
        {{^is_zaned }}
        <a class="timeline__btn j-zan" data-pid="{{pid}}" data-uid="{{user_id}}"></a>
        {{/is_zaned }}
        <a class="timeline__btn j-comment j-to-story" data-story-id="{{pid}}" data-uid="{{user_id}}"></a>
    </div>
    <div class="timeline__info">
        <p class="timeline__info--record">
            <span>{{ user_name }}</span>
            {{ post_desc }}
        </p>
        <p class="timeline__info--topic">
            {{#tags}}
            <span>#{{name}}</span>
            {{/tags}}
        </p>
        <p class="timeline__info--location">
            <span>{{ time }}</span>
            <span>{{ location }}</span>
        </p>
    </div>
</div>
{{/is_story}}
{{/data}}
</script>
EOF
?>



